package com.example.demo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;

//@EnableEurekaClient
@SpringBootApplication
@EnableApolloConfig
public class DemoAgentApplication implements CommandLineRunner {

	@Value("${redis.host}")
	private String host;
	@Value("${redis.port}")
	private int port;
	
	public static void main(String[] args) {
		SpringApplication.run(DemoAgentApplication.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		// TODO Auto-generated method stub
		System.out.println(host);
		System.out.println(port);
	}

}
